/*
 * @Author: TC
 * @Date: 2025-01-27 13:16:45
 * @Last Modified by: TC
 * @Last Modified time: 2025-06-06 18:04:28
 */

/**
 * 对象原型工具
 */
export namespace nsPrototypeUtil {
    /**
     * 定义属性
     * @param o
     * @param p
     * @param attributes
     */
    export function defineProperty(o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): void {
        if (o.prototype) {
            Object.defineProperty(o.prototype, p, attributes);
        }
    }

    /**
     * 修改原型链
     */
    export function modifyPrototype(o: any, protoName: string, val: any): void {
        o.prototype[protoName] = val;
    }
}
